package com.example.demo.service.impl;

import com.example.demo.dao.UserDao;
import com.example.demo.domain.po.User;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description: 用户的服务层实现
 * @Author: zsg
 * @Date: 2018/07/06 09:48
 */
@Service
public class UserServiceImpl implements UserService{

    @Autowired
    private UserDao userDao;

    @Override
    public void insert(User user) {
        this.userDao.insert(user);
    }

    @Override
    public User findUserByName(String name) {
        User user = this.userDao.queryByName(name);
        return user;
    }
}
